﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HidesaburoDotNET.Core
{
    /// <summary>
    /// あがったときに呼び出されるEventArgs
    /// </summary>
    public class CompleteEventArgs : EventArgs
    {

        List<Yaku> yakuList;

        public List<Yaku> YakuList
        {
            get { return yakuList; }
        }
        int totalFan;

        public int TotalFan
        {
            get { return totalFan; }
        }

        public CompleteEventArgs(List<Yaku> yaku)
        {
            this.yakuList = yaku;
            foreach (Yaku y in yaku)
            {
                totalFan += y.Fan;
            }
        }
    }
    public delegate void CompleteEvent(Player sender, CompleteEventArgs args);


    public class DiscardEventArgs : EventArgs
    {
        Hai discarded;

        public Hai Discarded
        {
            get { return discarded; }
        }
        public DiscardEventArgs(Player player,Hai discarded)
        {
            this.discarded = discarded;
        }

    }
    /// <summary>
    /// 8で割ることで、優先順を取得可能
    /// </summary>
    public enum NakiAction : int
    {
        None = 0,
        Chi_Any = 8,
        Chi_Low = 9,
        Chi_Mid = 10,
        Chi_High = 11,
        Kan = 16,
        Pon = 17,
        Ron = 24,
    }
    public delegate NakiAction DiscardEvent(Player sender,DiscardEventArgs args);

}
